


pub const FRAME_HEAD0: u8 = 0xE1;
pub const FRAME_HEAD1: u8 = 0x1E;

pub const FRAME_END: u8 = 0xEF;

pub const MIN_LEN: usize = 7;


pub fn xor_sum(buf: &[u8]) -> u8 {
    let mut s = 0;
    for v in buf {
        s = s ^ *v;
    }
    s
}








